package org.tuoren.official.es.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.dromara.easyes.annotation.HighLight;
import org.dromara.easyes.annotation.IndexField;
import org.dromara.easyes.annotation.IndexId;
import org.dromara.easyes.annotation.IndexName;
import org.dromara.easyes.annotation.rely.Analyzer;
import org.dromara.easyes.annotation.rely.FieldType;
import org.tuoren.common.mybatis.core.domain.BaseEntity;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 产品信息对象 t_product
 *
 * @author wl
 * @date 2024-11-26
 */
@Data
@IndexName("t_product")
public class ProductEs implements Serializable {

    private static final long serialVersionUID = -1L;


    @IndexId
    private Long id;

    /**
     * 产品名称
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String name;

    /**
     * 所属产品线
     */
    private Long typeId;

    /**
     * 一句话简介
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String summary;

    /**
     * 规格
     */
    private String spec;

    /**
     * 型号
     */
    private String model;

    /**
     * 产品介绍
     */
    @IndexField(fieldType = FieldType.TEXT,
        analyzer = Analyzer.IK_MAX_WORD, searchAnalyzer = Analyzer.IK_SMART)
    @HighLight(preTag = "<text style='color:red'>",postTag = "</text>")
    private String describes;

    /**
     * 产品图片URL
     */
    private String photoUrl;

    /**
     * 创建部门
     */
    private Long createDept;

    /**
     * 创建者
     */
    private Long createBy;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新者
     */
    private Long updateBy;

    /**
     * 更新时间
     */
    private Date updateTime;
    /**
     * 显示顺序
     */
    private Integer orderNum;
}
